package com.chinasoft.tw.service.qt;

import com.chinasoft.tw.pojo.Info;
import com.chinasoft.tw.service.TrueWord;

import java.util.ArrayList;
import java.util.List;
import java.util.Random;

public class qint implements TrueWord {
    private static final String DEFAULT_IMAGE_PATH = "img.png";

    private final String name;
    private final List<String> wordList;
    private final Random random;
    private String imagePath;

    public qint() {
        this.name = "朕的钱";
        this.wordList = initializeWordList();
        this.random = new Random();
        this.imagePath = DEFAULT_IMAGE_PATH;
    }

    private List<String> initializeWordList() {
        List<String> words = new ArrayList<>();
        words.add("云在青天水在瓶");
        words.add("唯你一人是忠臣良臣贤臣！！");
        words.add("我只是直臣！");
        words.add("无君无夫的直臣!!");
        words.add("奸臣已经跳出来啦！！");
        return words;
    }

    @Override
    public Info getTrueWord() {
        return new Info(name, wordList.get(random.nextInt(wordList.size())));
    }

    public String getImagePath() {
        return imagePath;
    }

    public void setImagePath(String imagePath) {
        this.imagePath = imagePath;
    }
}